import request from '@/utils/request'

// 查询秒杀列表
export function list(query) {
  return request({
    url: '/sys/seckillActivity/list',
    method: 'post',
    data: query
  })
}

// 查询商品列表
export function goods(data) {
  return request({
    url: `/sys/seckillActivity/goodsList`,
    method: 'post',
    data:data
  })
}

// 新增商品列表
export function addList(data) {
  return request({
    url: '/sys/seckillActivity/add',
    method: 'post',
    data: data
  })
}

// 秒杀活动详情
export function details(id) {
  return request({
    url: `/sys/seckillActivity/${id}`,
    method: 'get'
  })
}

// 停止秒杀
export function endActivity(id) {
  return request({
    url: `/sys/seckillActivity/stop/${id}`,
    method: 'get'
  })
}
// 获取商家列表
export function getShopList(id) {
  return request({
    url: `/sys/seckillActivity/getShopList/${id}`,
    method: 'get'
  })
}

// 新获取商品搜索列表
export function goodsList(data) {
  return request({
    url: '/sys/seckillActivity/goods/list',
    method: 'post',
    data: data
  })
}

//根据商品列表 查询详细商品
export function skuList(id) {
  return request({
    url: `/sys/seckillActivity/skuList/${id}`,
    method: 'get',
  })
}


